package com.stringdemo;

/**
 * @Auther: shiquan
 * @Date: 2024/10/17 - 10 - 17 -11:27
 */
public class StringBuilderDemo4 {
    public static void main(String[] args) {
        //创建对象
        StringBuilder sb = new StringBuilder();
        //添加字符串
        sb.append("hello").append("world").append("adeffvc");
        System.out.println(sb);

        //把StringBuilder变回字符串
        String str = sb.toString();
        System.out.println(str);

    }
}
